import { ResPage, Tree } from "@/api/interface/index";
import { TreePort } from "@/api/config/servicePort";
import http from "@/api";

/**
 * @name 用户管理模块
 */
// 获取区域列表
export const getUserList = (params: Tree.ReqUserManageParams) => {
  console.log(params, "params");
  const { page, pageSize, ...otherParams } = params;
  return http.post<ResPage<any>>(TreePort + `/system-item-setting/list`, {
    page: page,
    pageSize: pageSize,
    search_key: {
      ...otherParams
      // name: params.name,
      // status: params.status,
      // account: params.account,
      // mobile: params.mobile,
      // memo: params.memo,
      // created_at: params.created_at,
      // updated_at: params.updated_at
    }
  });
};

// // 新增用户
// export const addUser = (params: object) => {
//   return http.post(TreePort + `/user/add`, params);
// };

// // 编辑区域
// export const editUser = (params: object) => {
//   return http.post(TreePort + `/user/update`, { ...params });
// };

// // 删除用户
// export const deleteUser = (params: { user_id: string }) => {
//   return http.post(TreePort + `/user/delete`, params);
// };

// // 切换用户状态
// export const changeUserStatus = (params: { id: string; status: number }) => {
//   return http.post(TreePort + `/user/updateStatus`, params);
// };
